Part Number Hot Search : 
GT28F A3843 C1608C0G C12ST N4340W1E PR100 MM1222 E3SGS3B4
Product Description
Full Text Search
 

To Download LK202-24-USB Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
 LK202-24-USB
User Manual
LK202-24-USB rev 1
1
Table of Contents
1. Introduction.............................................................................................................................. 4 1.1 1.2 1.3 1.4 1.5 1.6 What it Does ..................................................................................................................................... 4 What it Does Not Do ........................................................................................................................ 4 Keypad Interface............................................................................................................................... 4 Setup for Testing .............................................................................................................................. 4 Trying Out your LK202-24-USB...................................................................................................... 5 Trying out a Keypad ......................................................................................................................... 6 1.6.1 Here's what to do: ................................................................................................................... 6 1.7 Manual Override............................................................................................................................... 7
2. Connections............................................................................................................................. 9 2.1 Connector Pinout .............................................................................................................................. 9 2.1.1 Power...................................................................................................................................... 9 2.1.2 USB Communications .......................................................................................................... 10 2.2 General Purpose Outputs ................................................................................................................ 11 3. Displaying Text ...................................................................................................................... 13 3.1 3.2 3.3 3.4 General ........................................................................................................................................... 13 The Built-In Character Font............................................................................................................ 14 Writing Text to the Display ............................................................................................................ 14 Text Commands.............................................................................................................................. 15
4. Keypad Interface.................................................................................................................... 17 4.1 4.2 4.4 4.5 General ........................................................................................................................................... 17 Connections .................................................................................................................................... 17 USB Interface ................................................................................................................................. 18 Keypad Commands......................................................................................................................... 18
5. Bar Graphs and Special Characters .................................................................................... 20 5.1 Command List ................................................................................................................................ 20 6. Miscellaneous Commands ................................................................................................... 22 6.1 Command List ................................................................................................................................ 22 7. Appendix: Command Summary ........................................................................................... 26 7.1 General ........................................................................................................................................... 26 7.2 Issuing Commands.......................................................................................................................... 26 7.3 On Numbers.................................................................................................................................... 26 7.3.1 ASCII Characters.................................................................................................................. 27 7.4 Text Commands.............................................................................................................................. 27 7.5 Keypad Interface Commands.......................................................................................................... 28 7.6 Bar Graphs and Special Characters ................................................................................................ 29 7.7 Miscellaneous Commands .............................................................................................................. 30 8. Appendix: Specifications and Options................................................................................ 32 8.1 Specifications.................................................................................................................................. 32
LK202-24-USB rev 1
2
8.2 Options ........................................................................................................................................... 33 9. Appendix: Glossary............................................................................................................... 34
Revisions
Version 1.0, November 10, 2002
LK202-24-USB rev 1
3
1. Introduction
Your LK202-24-USB has the following features: 20 column by 2 line text display built-in font with provision for up to 8 user-defined characters Speeds from 1200 bps to a lighting fast 19.2 Kbps over RS232 Communicate over USB Use up to 100 modules on the same USB Host Fully buffered so that no delays in transmission are ever necessary Add your own Splash/Start-up screen Use our "Remember" functions to save settings Software controlled contrast Software controlled backlight brightness Backlight with configurable time-out setting up to 180 minutes Use up to a 24 key keypad with a 10 key buffer. Six general purpose outputs for a variety of applications Horizontal or Vertical bar graphs Power and data from one USB cable Fits our PC Bay inserts without any modifications
1.1 What it Does
The LK202-24-USB is designed as the display unit for an associated controller. The controller may be anything from a single board, special purpose microcontroller to a PC, depending on the application. This controller is responsible for what you see on the screen of the LK202-24-USB. The LK202-24-USB provides a simple command structure to allow text and bar graphs to be displayed on the screen. Text fonts are built in, and use standard ASCII mapping. Provision is made for up to 8 userdefined characters. The screen is backlit for low-light situations. Backlighting may be turned on or off under program control. Contrast is adjustable to compensate for differing lighting conditions and viewing angles. General purpose outputs allow the controller to switch up to six electronic or electro-mechanical devices by issuing commands to the display unit. These can be used for controlling LEDs, relays, etc.
1.2 What it Does Not Do
The LK202-24-USB does not include bitmap graphics capability, except that permitted by defining special characters.
1.3 Keypad Interface
The keypad interface takes row/column input and converts it to ASCII characters, which are delivered out the USB port to the associated controller. Note that the keypad is not used to directly control any aspect of the operation of the LK202-24-USB, which acts simply as a matrix to serial converter. If you want to use the keypad to control the LK202-24-USB display you must program your controller accordingly.
1.4 Setup for Testing
Before setting up your application you may want to try out the LK202-24-USB. This is easily done with a PC. Here's what you'll need: A available powered USB port
LK202-24-USB rev 1
4
USB Drivers (located on our website and the eCD) Test software, such as Alpha Demo or Display Tuner
Figure 1-1 Connections for Testing
1. Refer to the diagram above and Figure 2-1 for the following steps. 2. Connect the USB cable to the LCD and to the computer. 3. Install the necessary drivers. (located on the eCD or in our download section) 1. 2. 3. 4. Download or copy files into a directory Uncompress the files, they will be a self extracting ZIP file. Windows will prompt you for drivers for a USB Serial Device
Select specify location and point the driver install to your directory
4. Test the LCD. Now you're ready to try it out.
1.5 Trying Out your LK202-24-USB
The unit is connected to power and the PC and the backlight is on. You're ready to make sure it's working properly. To experiment with typing text, run a PC terminal program, such as Hyperterm. Make sure it's configured to use the correct port. Set the baud rate to 19,200 and flow control is turned off. If you type characters on the keyboard, they should now appear on the LK202-24-USB screen. Text will wrap around to the next line when you reach the end of a line. You can also try Alpha Demo, Display Tuner or MOGD for basic LCD tests. If you've reached this point and operation is normal, you can be confident that your LK202-24-USB works properly.
LK202-24-USB rev 1
5
1.6 Trying out a Keypad
Since a number of different keypad types can be connected to the LK202-24-USB, the results you get may be a little unpredictable. At this point all we need to do is make sure that your keypad and interface work, and possibly generate an ASCII map for your programming needs. The keypad interface on the LK202-24-USB converts a row/column connection to an ASCII character. By default, a keypress is transmitted as serial data immediately. Keypad buffering can be selected using the appropriate commands.
1.6.1 Here's what to do:
1. 2. Your PC should be running a terminal program, such as Hyperterm (as in the previous section). With the LK202-24-USB connected to the PC, plug in your keypad. If your connector has fewer pins than the one on the LK202-24-USB, center it as well as possible. Note 1: The keypad connector must be wired with columns on one side and rows on the other side of the center of the connector. If your keypad isn't wired this way you will need to make an adapter or rewire the connector to meet this requirement. Note 2: The connector is reversible. Reversing the connector will not damage the keypad or the LK202-24-USB, but it will change the ASCII character map. 3. Press a key on the keypad. An upper case ASCII character (A-Y) should appear on the PC screen. Different keys should generate different characters.
If you want to experiment, reverse the connector and see if it generates a more logical set of characters. Ultimately, the program in your controller will have to "map" these characters to the ones marked on the keypad, which will likely be different.
LK202-24-USB rev 1
6
1.7 Manual Override.
Manual override should only be required in one instance. If for some reason the module is set at a baud rate that cannot be produced by the host system and all communication to the display is lost, then the user should follow this simple procedure: 1. 2. 3. 4. 5. Download the "Display tuner" application from www.matrixorbital.com/downloads. Turn off the display Put a jumper on pins 6 and 7 of the keypad connector Power up the display. The baud rate is now set to 19,200. Remove the jumper and change the RS-232 port settings to the desired baud rate. The Display Tuner can also test the display by adjusting contrast or brightness and sending text to the display. Save the settings by checking the boxes next to the slider bars. The baudrate can be saved by clicking the "Set" button. Turn off the display. Power up the display.
6. 7.
Refer to the "Set RS-232 Port Speed" command (section 5.1.13) for acceptable baud rates.
LK202-24-USB rev 1
7
1.8 Memory Chip Lock Down
The LK202-24-USB uses a memory chip to store speed, startup screen, contrast and backlight brightness. When everything has been changed to the wanted settings and the unit will be in a finished product or in the field, locking down the memory chip so no settings can be changed might be desirable. This is only to be done by knowledgeable people. Any damage to the display by this procedure resulting from user error will no be covered under warrantee.
Unlocked (default)
Locked
To lock down the memory chip, solder the jumper in the red box and remove the solder from the jumper with the arrow pointing to it. This will lock down the memory chip, not allowing anything to be changed inside it until the jumpers are returned to their original state.
LK202-24-USB rev 1
8
2. Connections
2.1 Connector Pinout
Refer to the diagram below for this chapter.
Figure 2-1 Electrical Connections
Connector 14 pin dual header Rx/Tx 10 pin header USB Alt. USB 4 pin White header
Function General purpose outputs (6) (see section 2.2) and +5V Output Receive and Transmit LED outputs Keypad (see section 2.6.12) Communication/power (see section 0) Alternate USB / power header Optional High power GPO power input
2.1.1 Power
USB High power ports can supply 500mA of power and low power devices (such as un-powered hubs) can only supply 150mA of power. Please make sure you observe the total power usage on the LCD when connected to the USB port. The LCD will require between 125mA to 200mA depending on the model and the number of GPOs you are using.
GPO
+5V Low Power +5V High Power 20mA
Maximum Power
750mA (PLEASE NOTE, an unmodified USB host can only supply a maximum of 500mA on a high power out put and only 150mA on low power. 750mA
+12V High Power
Power is applied via the USB cable or the alternate USB header. Power requirement is +5 VDC 0.25V and 180mA minimum.
LK202-24-USB rev 1
9
Warning:
When using the Alternate USB Header, verify all the cable pin outs before applying power. Incorrect power application may damage the display. Make sure the host is capable of supplying all the necessary power. Add the LCD power requirement and the GPO power if used for a total power requirement. The LK202-24-USB has a secondary power connector used for High Power GPOs. Only if you are planning on using GPO 4, GPO 5 and GPO 6 as 12V should you plug in a unmodified 3.5" floppy power cable.
Pin 1 Pin 2 Pin 3 Pin 4
+12.0 VDC (normally from PC power supply) Ground Ground + 5.0 VDC (normally from PC power supply)
Figure 2-2 Power connector
+12 GND GND +5 1 2 3 4
Make sure you have sufficient current capacity to handle the desired load. Each High Power GPO can source over 750mA.
2.1.2 USB Communications
A standard B type USB header is provided on the LK202-24-USB for USB communication. The USB cable provides power and data to the LCD. There is two ways of communicating to the LCD. Under Windows, you can have direct access to the LCD by drivers or create a Virtual COM Port (VCP). With the VCP, a new COM Port gets created in Windows. Under the control panel you can set all the options for the USB device, including speed. (By changing the speed, you will have to change the speed in the LCD also, so you have to change the speed settings in two places). Windows 98, Windows ME, Windows 2000 and Windows XP drivers have been tested and work. VCP drivers are also available for Apple OS-X, OS-8 and OS-9. Linux drivers are available as well, but have not been testing by us nor will we be able to provide any support for them.
LK202-24-USB rev 1
10
2.1.3 Alternate USB Communications
Pin Number 1 2 3 4 5
Description +5V DD+ Not Used Ground
Please verify the pin out with your motherboard manual.
2.2 General Purpose Outputs
The LK202-24-USB has six general purpose outputs. These are provided to control relays or other electronic devices. This allows external devices to be turned on or off using your PC or controller and software commands. (See sections 5.1.10 and 5.1.11 for the command syntax.) The LK202-24-USB has 2 types of GPOs, low and high power. GPO 1, 2 and 3 are refered to as Low Power GPOs and are capable of sourcing +5V at 20mA which is limited with a 240 ohm current limiting resistors. GPO 4, 5 and 6 have no current limiting resistors and offer an optional +12V power through the white floppy connecter located bottom left of the display.
LK202-24-USB rev 1
11
Figure 2-3 General Purpose Outputs
GPO 1, GPO 2, GPO 3
Maximum allowable current is 20mA, which is enforced by a 240ohm current limiting resistor. If the device being switched has a resistance of 240 ohms or more the corresponding resistor may be shorted. Solder a small jumper wire (wirewrap wire is good) from the feed through hole to the corresponding negative pin for the GPO in question.
Note: The GPOs do not have any over current or over/under voltage protection so care must be taken when using them. For instance if the external device is a relay it must be fully clamped (using a diode and capacitor) to absorb any generated back electro-motive force (EMF).
GPO
+
1N400 1 10 - 100 uF Relay coil
Figure 2-4 Clamping a Relay
LK202-24-USB rev 1
12
GPO 4, GPO 5 and GPO 6
The LK204-22-USB has three high current general purpose outputs. These are provided to control both electromechanical and electronic devices. This allows external devices to be turned on or off using your PC or controller and software commands. (See sections 5.1.10 and 5.1.11 for the command syntax.) Each output is wired as shown in Figure 2-3. MOSFET electronic switches can connect any of the 3 GPO header pins to ground. Displaying Text GPOs can control 12V or 5Vdevices depending on the jumper selection. Maximum allowable current is 750 mA per GPO at 12V and 750mA a 5V (CAUTION, only if your USB host can supply enough current!), which allows the GPOs to be used for controlling fans, stepper motors, etc. directly without the need for a relay in many cases. When using the high power GPOs with +5V selection, note that the USB host can provide a maximum of 500mA on a high power host and 150mA on a low power host. The +12V line will be taken from your systems power supply so there should not be any need to be concerned with using more current then the power supply can supply. But exercise caution with the +5V line. Damage may result to your motherboard or USB controller and will not be covered under any warranty from Matrix Orbital.
+5V Low Power GPO
+12V High Power GPO
2.3 General
Text is displayed on the LK202-24-USB using the built-in 5 x 7 dot matrix font (plus up to 8 user-defined characters.
LK202-24-USB rev 1
13
2.4 The Built-In Character Font
The LK202-24-USB includes a built-in 5 x 7 dot matrix font with the full range of ASCII characters plus a variety of extended characters, as shown in Figure 2-5.
Figure 2-5 Character Set
In addition to the built-in characters, users may define up to 8 special characters (which, once defined, occupy positions 0x00 to 0x07 in the above chart). The LK202-24-USB does not have provision to download other fonts.
2.5 Writing Text to the Display
When the display receives a character, it displays that character at the position currently defined. The next character sent to the module then advances to the following position on the display. Characters are drawn using the built-in font, and only characters defined in the font are actually displayed. Characters that are not defined by the built-in font print as a space (i.e. the cursor is advanced for the next character).
LK202-24-USB rev 1
14
The position where text is to be inserted is a character location stored in the LK202-24-USB's volatile memory and maintained internally by the LK202-24-USB's firmware. This position is manipulated by the commands shown in the following section.
2.6 Text Commands
In this section commands are identified by their names and decimal values. Hex and ASCII equivalents are given in the summary (Table 6-1). Before issuing commands to the LK202-24-USB please read sections 6.2 and 6.3. Some commands, marked with an (R), may be "remembered" to set new defaults that will be in effect each time the unit is powered on. See section 5.1.1 for further information.
2.6.1 Auto line wrap on (254 67) (R)
Enables automatic line wrapping. Note that this is not "word wrapping" and wraps may occur in the middle of a word.
2.6.2 Auto line wrap off (254 68) (R)
Disables automatic line wrapping. Characters beyond the end of a line will be lost.
2.6.3 Auto scroll on (254 81) (R)
When auto scrolling is on, it causes the LK202-24-USB to shift the entire display's contents up to make room for a new line of text when the text reaches the scroll position (the bottom right character position).
2.6.4 Auto scroll off (254 82) (R)
When auto scrolling is disabled, text will wrap to the top left corner of the display area. Existing text in the display area is not erased before new text is placed. A series of "spaces" followed by a Cursor Home command may be used to erase the top line of text.
2.6.5 Set cursor position (254 71 [column] [row])
This command sets the cursor position (text insertion point) to the [column] and [row] specified. Columns have values from 1 to 20 (0x01 to 0x14) and rows have values of 1 and 2 (0x01 and 0x02).
2.6.6 Send cursor home (254 72)
This command moves the cursor position (text insertion point) to the top left of the display area.
2.6.7 Turn on underline cursor (254 74) (R)
Turns on the underline cursor. The cursor shows the current text insertion point. Both underline and blinking cursors may be turned on or off independently. The cursor is off by default.
2.6.8 Turn off underline cursor (254 75) (R)
Turns off the underline cursor. Does not affect the blinking block cursor.
2.6.9 Turn on block (blinking) cursor (254 83) (R)
Turns on the blinking block cursor. The cursor shows the current text insertion point. Both blinking and underline cursors may be turned on or off independently. The cursor is off by default.
LK202-24-USB rev 1
15
2.6.10 Turn off block (blinking) cursor (254 84) (R)
Turns off the blinking block cursor. Does not affect the underline cursor.
2.6.11 Cursor left (254 76)
Moves the cursor one position to the left but does not erase any character that may be in that position. Note that this command moves the text insertion point even if the cursor is turned off. Note: A "destructive backspace", which erases the character to the left of the original position, may be done by issuing the following sequence: cursor left, space, cursor left.
2.6.12 Cursor right (254 77)
Moves the cursor one position to the right but does not erase any character that may be in that position. Note that this command moves the text insertion point even if the cursor is turned off.
LK202-24-USB rev 1
16
3. Keypad Interface
This chapter describes the keypad interface and associated commands in detail.
3.1 General
The LK202-24-USB keypad interface processes the keypad row/column matrix into a serial data byte stream. Aside from this processing, the keypad has no effect on the LK202-24-USB display. If you need to send keystrokes to the display, they must be routed through your controller.
3.2 Connections
Figure 3-1 Keypad Connector
The connector is not "keyed" so your keypad will probably plug in either of two ways. The LK202-24-USB will not be damaged by reversing the connector, but your keypad will generate a different ASCII character mapping for each position. If your connector has fewer than 10 pins it should be centered on pins 6 and 7 of the connector. The returned key codes are as follows, but note that your keypad may be laid out in a different pattern. If this is the case, you will need to interpret the key codes differently. The diagram 1 shows the logical layout (row 1, column 1 in upper left). The connector for the keypad is a 10 pin 0.1" spacing male header. Pin 1 is indicated in Figure 2-1. Pins 1 through 5 are columns and pins 6 through 10 are rows. The keypad is scanned whenever a key is pressed: there is no continuous key scan. This means that key presses are dealt with immediately without any appreciable latency. This also prevents electrical noise which is often caused by continuous key scans. Columns 1 1 Rows 2 3 4 G M S H N T I O U J P V K Q W L R X A 2 B 3 C 4 D 5 E 6 F
Note: The keypad connector must be wired with columns on one side and rows on the other side of the center of the connector. If your keypad isn't wired this way you will need to make an adapter or rewire the connector to meet this requirement.
LK202-24-USB rev 1
17
3.3 USB Interface
By default on any press of a key, the module will immediately send out the key code at the selected baud rate. This behavior can be modified using commands found in the next section.
3.4 Keypad Commands
Before issuing commands to the LK202-24-USB please read sections 6.2 and 6.3. Some commands, marked with an (R), may be "remembered" to set new defaults that will be in effect each time the unit is powered on. See section 5.1.1 for further information.
3.4.1 Auto repeat mode on (254 126 [mode]) (R)
[mode] = 0x00 gives Resend Key Code mode [mode] = 0x01 gives Key down / Key up code mode Two Modes of auto repeat are available and are set via the same command. 1. Resend Key Code: This mode is similar to the action of a keyboard on a PC. In this mode, when a key is held down, the key code is transmitted immediately followed by a 1/2 second delay. After this delay, key codes will be sent via the RS - 232 interface at a rate of about 5 codes per second. This mode has no effect if polling or if using the IC interface. Key down / Key up codes: This mode may be used when the typematic parameters of the Resend Key code mode are unacceptable or if the unit is being operated in polled mode. The host system detects the press of a key and simulates an auto repeat inside the host system until the key release is detected. In this mode, when a key is held down, the key code is transmitted immediately and no other codes will be sent until the key is released. On the release of the key, the key release code transmitted will be a value equal to the key down code plus 20 hex. For example, the key code associated with key 'P' (0x50) is pressed, the release code is 'p' (0x70). In RS-232 polled mode (see 3.4.4 below) or via the IC interface, the key down / key up codes are used; however, the user should be careful of timing details. If the poll rate is slower than the simulated auto - repeat it is possible that polling for a key up code will be delayed long enough for an unwanted key repeat to be generated (see Figure 3-2).
2.
Polls Key up Key down auto-repeat clock
valid key stroke (before key up)
unwanted auto-repeat after key-up.
Figure 3-2 Poll timing
3.4.2 Auto repeat mode off (254 96) (R)
This command turns off auto repeat mode.
LK202-24-USB rev 1
18
3.4.3 Auto transmit keypresses on (254 65) (R)
In this mode, all keypresses are sent immediately to the host system without the use of the poll keypad command. This is the default mode on power up.
3.4.4 Auto transmit keypresses off (254 79) (R)
In this mode, up to 10 keypresses are buffered until the unit is polled by the host system via the poll keypad command. Issuing this command places the unit in polled mode.
3.4.5 Clear key buffer (254 69)
This command clears any unread keypresses. In a menuing application, if the user presses a key which changes the menu context, any following key presses may be inaccurate and can be cleared out of the buffer between menu changes to prevent jumping around the menu tree. It may also be used to, in effect, reset the keypad in case the host application resets for whatever reason.
3.4.6 Poll keypad (254 38)
This command returns any unbuffered keypresses via the RS - 232 interface. The host system must be set up to receive the key codes. When the LK202-24-USB receives this command it will immediately return any unbuffered keypresses which may have not been read already. If there is more than one keypress buffered, then the high order bit (MSB) of this returned keycode will be set (1). If this is the only buffered keypress, then the MSB will be reset (0). If there are no buffered keypresses, then the returned code will be 0x00. Please note to make use of this command the "Auto Transmit Keypress" mode should be off.
3.4.7 Set debounce time (254 85 [time]) (R)
[time] is in increments of 6.554 milliseconds. This command sets the time between key press and key read. All key types with the exception of latched piezo switches will "bounce" for a varying time, depending on their physical characteristics. The default debounce time for the module is about 52 mS, which is adequate for most membrane keypads. This time equates to a setting of 8 using this command as there is a debounce time resolution of 6.554 milliseconds.
LK202-24-USB rev 1
19
4. Bar Graphs and Special Characters
The LK202-24-USB includes the ability to draw bar graphs (either horizontal or vertical) and allows users to define up to eight special characters. Before issuing commands to the LK202-24-USB please read sections 6.2 and 6.3. Eight characters (ASCII values 0x00 to 0x07) are set aside for use with bar graphs, user defined characters, and big numbers. Since the same 8 characters are used for each function, the functions may not be used simultaneously. The characters may be defined or redefined at any time by issuing the commands shown in this section. Once defined, they may be used either by means of the bar graph commands, or by simply issuing one of the ASCII values 0x00 to 0x07 (which is not prefixed by the command byte, 254).
4.1 Command List
4.1.1 Initialize wide vertical bar graph (254 118)
This command defines the 8 special/user characters to be blocks suitable for use in drawing wide (5 pixel) vertical bar graphs. Any previously existing definitions will be lost. Once this command has been issued, any number of vertical bar graphs may be drawn unless the characters are redefined by another command.
4.1.2 Initialize narrow vertical bar graph (254 115)
This command defines the 8 special/user characters to be blocks suitable for use in drawing narrow (2 pixel) vertical bar graphs. Any previously existing definitions will be lost. Once this command has been issued, any number of vertical bar graphs may be drawn unless the characters are redefined by another command.
4.1.3 Draw vertical bar graph (254 61 [column] [height])
Draws a vertical bar graph in [column] having a height of [height] pixels. The height may range from 0 to 20 (0x00 to 0x14) pixels. The necessary characters must first be initialized by either of the commands shown in section 4.1.1 or 4.1.2, which will determine the width of the graph drawn. Graph may be erased by drawing a bar graph of height = 0 in the same column.
4.1.4 Initialize horizontal bar graph (254 104)
This command defines the 8 special/user characters to be blocks suitable for use in drawing horizontal bar graphs. Any previously existing definitions will be lost. Once this command has been issued, any number of horizontal bar graphs may be drawn unless the characters are redefined by another command.
4.1.5 Draw horizontal bar graph (254 124 [column] [row] [dir] [length])
Draws a horizontal bar graph in [row] starting at [column] with a length of [length] pixels. [row] may have a value of 0x01 or 0x02, column may range from 0x01 to 0x14 and length may be from 0x00 to 0x64 (0 to 100) if the graph can extend the full width of the screen. Each column is 5 pixels wide (spaces between the columns don't count). [dir] specifies the direction: 0x00 goes from left to right, 0x01 goes from right to left.
4.1.6 Define custom character (254 78 [c] [8 bytes])
The LK202-24-USB allows up to 8 user defined (custom) characters. These characters occupy the first 8 (0x00 to 0x07) places in the character set (see Figure 2-5).
LK202-24-USB rev 1
20
Custom characters occupy a 5 x 8 pixel matrix. Built-in characters are 5 x 7: the bottom row of pixels is normally reserved for the underline cursor. The underline cursor should be turned off if the bottom row of pixels forms part of a custom character. The characters are defined by issuing the command 254 78 [c] followed by 8 bytes to define the character. [c] is the character number (0x00 to 0x07). The 8 bytes are mapped as shown below:
MSB * * * * * * * * * * * * * * * * * * * * * * * * 1 6 2 7 3 8 4 9 14 19 24 29 34 39 LSB 5 10 15 20 25 30 35 40 Data Byte 1 Data Byte 2 Data Byte 3 Data Byte 4 Data Byte 5 Data Byte 6 Data Byte 7 Data Byte 8
11 12 13 16 17 18 21 22 23 26 27 28 31 32 33 36 37 38
A "1" bit indicates an on (black) pixel, a "0" bit indicates an off (clear) pixel. Once defined, a character is displayed simply by issuing a value (0x00 to 0x07) corresponding to the character number. The character will be laid out as follows:
1 6 11 16 21 26 31 36 2 7 12 17 22 27 32 37 3 8 13 18 23 28 33 38 4 9 14 19 24 29 34 39 5 10 15 20 25 30 35 40
Cursor Line
Note: Custom characters will be erased if any of the "initialize bar graph" commands are issued.
LK202-24-USB rev 1
21
5. Miscellaneous Commands
The commands listed in this chapter don't readily fit in any of the other categories, or are used in more than one category. Before issuing commands to the LK202-24-USB please read sections 6.2 and 6.3. Some commands, marked with an (R), may be "remembered" to set new defaults that will be in effect each time the unit is powered on. See section 6.1.1 for further information.
5.1 Command List
5.1.1 Remember (254 147 [0|1])
This command allows a number of settings, such as cursor state, backlight, etc. to automatically be stored to non-volatile memory so they become new defaults. The command should only be used when required for two reasons: 1. 2. Writing to non-volatile memory is time consuming and slows down the operation of the display. Non-volatile memory has a "write limit" and may only be changed approximately 100,000 times.
Commands which may be used with the "remember" function are marked with an "R" in the "default" column in the command tables. The example shows the procedure to set Auto scroll ON as the default condition. Commands are shown in both decimal and hex in this example. Decimal 254 147 1 254 81 254 147 0 Hex FE 93 01 FE 51 FE 93 00 Function Turn on "remember" function. Turn on auto scroll. Since "remember" is ON, this setting will be saved in non-volatile memory. Turn off "remember" function.
Any number of commands may be entered between the "remember ON" and "remember OFF" commands, and all settings will be memorized.
5.1.2 Clear display (254 88)
This command clears the display and resets the text insertion point to the top left of the screen.
5.1.3 Set contrast (254 80 [contrast])
This command sets the display's contrast to [contrast], where [contrast] is a value between 0x00 and 0xFF (between 0 and 255). Lower values cause "on" elements in the display area to appear lighter, while higher values cause "on" elements to appear darker. Lighting conditions will affect the actual value used for optimal viewing. Individual LK202-24-USB modules will also differ slightly from each other in appearance. In addition, values for optimal viewing while the LK202-24-USB backlight is on may differ from values used when backlight is off.
5.1.4 Set contrast and save (254 145 [contrast])
This command works in exactly the same way as the "Set Contrast" command. The only difference is that it saves the contrast value in the non-volatile memory of the module, whereas the previous command only changes the value until the next power down.
LK202-24-USB rev 1
22
5.1.5 Backlight on (254 66 [minutes]) (R)
This command turns on the backlight for a time of [minutes] minutes. If [minutes] is zero (0), the backlight will remain on indefinitely. Note: the factory default for backlight is on.
5.1.6 Backlight off (254 70) (R)
This command turns the backlight of the LK202-24-USB off.
5.1.7 Set backlight brightness (254 153 [brightness])
This command sets the display's brightness to [brightness], where [brightness] is a value between 0x00 and 0xFF (between 0 and 255). The higher the number is, the brighter the backlight will appear.
5.1.8 Set backlight brightness and save (254 154 [brightness])
This command works in exactly the same way as the "Set Backlight Brightness" command. The only difference is that it saves the brightness value in the non-volatile memory of the module, whereas the previous command only changes the value until the next power down.
5.1.9 Load startup screen (254 64 [40 characters])
This command sets and memorizes the startup screen that will appear each time the LK202-24-USB is turned on. By default the screen shows: Matrix Orbital LK202-24-USB
The 40 characters define the two 20 character rows of the screen. They may be any characters from the character set shown in Figure 2-5. Character 1 ---------------------------- Character 20 Character 21 --------------------------- Character 40
5.1.10 General purpose output off (254 86 [gpo #])
This command turns OFF any of the General Purpose Outputs (see section 2.2 for a description of the GPOs). [gpo #] is 1 to 6.
5.1.11 General purpose output on (254 87 [gpo #])
This command turns ON any of the General Purpose Outputs. [gpo #] is 1 to 6.
LK202-24-USB rev 1
23
5.1.12 Read module type (254 55)
This command will return, the model type value of the module. Values for various modules at the time of this publication are as follows:
LCD0821 - 0x01 LCD2041 - 0x05 LK202-25 - 0x08 VFD2021 - 0x0B VK202-25 - 0x0E GLC12864 - 0x11 GLK12864-25 - 0x14 GLK12232-25 - 0x22 LK402-12 - 0x33 LK202-24-USB - 0x36
LCD2021 - 0x03 LCD4021 - 0x06 LK204-25 - 0x09 VFD2041 - 0x0C VK204-25 - 0x0F GLC128128 - 0x12 GLK24064-25 - 0x15 LK404-AT - 0x31 LK162-12 - 0x34
LCD1641 - 0x04 LCD4041 - 0x07 LK404-55 - 0x0A VFD4021 - 0x0D GLC12232 - 0x10 GLC24064 - 0x13 GLK128128-25 - 0x21 VFD1621 - 0x32 LK204-25PC - 0x35
The LCD will return a one-byte hex value.
5.1.13 Set RS232 port speed (254 57 [speed])
This command sets the RS232 port to the specified [speed]. The change takes place immediately. [speed] is a single byte specifying the desired port speed. Valid speeds are shown in the table below. The speed can be manually reset to 19,200 baud in the event of an error during transmission (including transmitting a value not listed below) by setting the "manual override" jumper on the module during power up. This command is ignored until this jumper is removed again.
Speed Value FF Hex 81 Hex 20 Hex 0F Hex Speed 1200 baud 2400 baud 9600 baud 19200 baud
5.1.14 Set Serial Number (254 52 [byte1] [byte2]
Modules may be delivered with the serial number blank. In this case the user may set the desired 2 byte serial number using this one time only command. Upon the execution of this command, the module will echo these two bytes back over the RS-232 interface. The serial number may be set only once. Any future attempt to execute this command will result in no change and the module will return to the originally set serial number.
5.1.15 Read Serial Number (254 53)
This command will return a two byte hex value, over the RS-232 interface, the serial number of the module as it was previously stored.
LK202-24-USB rev 1
24
5.1.16 Read Version Number 254 54)
This command will return the firmware version number of the LK202-24-USB. It will be a one-byte hex value.
LK202-24-USB rev 1
25
6. Appendix: Command Summary
6.1 General
The operation of the LK202-24-USB is controlled by a simple and consistent command set. Commands control text display graphics display keypad interface miscellaneous operating parameters This chapter includes summary tables of all commands. Individual commands are discussed in detail in Chapters 0 to 4 in the same sequence as in the following tables.
6.2 Issuing Commands
Commands are issued to the LK202-24-USB by the controller. In a test setup, commands can be issued to the LK202-24-USB by means of a BASIC program, using the chr$( ) function. In the tables below, we've shown commands in hex, ASCII and decimal form. All commands begin with the prefix character 0xFE (254 decimal). These commands are issued on the serial communications link USB) at the currently defined baud rate. For example (using BASIC in a test setup), you could issue the command to clear the screen on the LK20224-USB by including the line: PRINT#1,chr$(254);chr$(88) Or with C you could (using Zcomm serial library) ZComm1->WriteCommByte(0xfe); ZComm1->WriteCommByte('X');
6.3 On Numbers
Like all computerized devices, the LK202-24-USB operates with commands and values in the form of binary numbers. These binary numbers are arranged in 8 digit (i.e. 8 bit) groups called bytes. The decimal value of a byte may have any value from 0 to 255. Bytes are usually specified in either decimal or hexadecimal (base 16) form for convenience, since binary numbers are confusing to deal with directly. Hexadecimal (hex) numbers are particularly convenient because exactly two hexadecimal digits make up one byte, each hex digit representing 4 binary digits (4 bits) as shown here:
Binary 0000 0001 0010 0011 0100 0101 0110 Hex 0 1 2 3 4 5 6 Decimal 0 1 2 3 4 5 6 Binary 1000 1001 1010 1011 1100 1101 1110 Hex 8 9 A B C D E Decimal 8 9 10 11 12 13 14
LK202-24-USB rev 1
26
0111
7
7
1111
F
15
Based on the table, the byte 01001011 can be represented in hex as 4B, which is usually written as any of 4Bh, 4BH, 4B hex or 0x4B. The numbers can also be expressed in decimal form if preferred.
6.3.1 ASCII Characters
Since computers deal internally with numbers only, but externally with both letters and numbers, several schemes were developed to "map" written characters to numeric values. One such scheme has become universal, the American Standard Code for Information Interchange, or ASCII. ASCII tables are readily available from a number of sources. A few examples will do here:
The letter The letter The number The number A a 0 9 has a value of has a value of has a value of has a value of 65 decimal or 97 decimal or 48 decimal or 57 decimal or 41 hex 61 hex 30 hex 39 hex
This gives rise to the possibility of confusion when parameters are being set on the LK202-24-USB For example, the GPO ON and OFF commands use a number to indicate which GPO is being controlled. We're told that acceptable values are 0 to 6. All such parameters must use numeric values (i.e. the actual byte values). If we send the ASCII number 0 by mistake it will actually give the value 48 decimal (30 hex) to the parameter, which is wrong. In the tables given in the following sections ASCII characters are shown as 'A', with single quotes.
6.4 Text Commands
See Chapter 0 for command descriptions. Syntax in the tables below is given in hex, decimal and decimal with ASCII, in that order, one per line. Note: The letter "R" in the Default column indicates that this state can be saved to nonvolatile memory with the Remember command. See section 5.1.1.
Table 6-1 Text Commands Command Auto line wrap on Syntax FE 43 254 67 254 'C' FE 44 254 68 254 'D' FE 51 254 81 254 'Q' FE 52 254 82 254 'R' FE 47 [col] [row] 254 71 [col] [row] Default on R on R off R off R n/a Notes Enables line wrapping (not word wrap).
Auto line wrap off
Disables line wrapping.
Auto scroll on
Enables scroll at bottom of screen. Text will push display up one line to make room for new line. Disables auto scroll. Text will wrap to top left and overwrite existing text. Moves cursor to the specified column and row. The cursor marks the text insertion point in
Auto scroll off
Set cursor position
LK202-24-USB rev 1
27
Command
Syntax 254 'G' [col] [row]
Default
Notes The cursor marks the text insertion point in this and all commands. This command moves the cursor to the top left of the display area.
Send cursor home
FE 48 254 72 254 'H' FE 4A 254 74 254 'J' FE 4B 254 75 254 'K' FE 53 254 83 254 'S' FE 54 254 84 254 'T' FE 4C 254 76 254 'L' FE 4D 254 77 254 'M' off R R
Underline cursor on
Turns on the underline cursor.
Underline cursor off
Turns off the underline cursor.
Block cursor on
on R R
Turns on the blinking block cursor.
Block cursor off
Turns off the blinking block cursor.
Cursor left
Moves the cursor one position to the left. If the cursor is already at the beginning of a line it will move to the end of the other line. Moves the cursor one position to the right. If the cursor is already at the end of a line it will move to the beginning of the other line.
Cursor right
6.5 Keypad Interface Commands
Note: The letter "R" in the Default column indicates that this state can be saved to nonvolatile memory with the Remember command. See section 5.1.1.
Table 6-2 Keypad Interface Commands Command Auto repeat mode on Syntax FE 7E [0x00|0x01] 254 126 [0|1] 254 '~' [0|1] FE 60 254 96 254 '' FE 41 254 65 254 'A' FE 4F 254 79 254 'O' FE 45 254 69 254 'E' Default off R off R on R off R n/a Notes Applies to keypad only. 0x00 = 200 ms typematic, 0x01 = key down/key up codes sent. Applies to keypad only.
Auto repeat mode off
Auto transmit key presses on Auto transmit key presses off Clear key buffer
Sets auto transmit mode for keypad. Key presses are transmitted to host without polling. Up to 10 key presses buffered until polled.
Clear unread key presses.
LK202-24-USB rev 1
28
Command Poll keypad
Syntax FE 26 254 38 254 '&' FE 55 [time] 254 85 [time] 254 'U' [time]
Default n/a
Notes Returns buffered key presses to application. Returns 0x00 if no key presses. High order bit set unless this is the last/only key press. Resolution: 1 = 0.6554 ms [time] is a numeric multiplier.
Set debounce time
52 ms R
6.6 Bar Graphs and Special Characters
The commands in this section are used to define and display bar graphs and special characters.
Table 6-3 Bar Graph and Special Character Commands Command Initialize thick vertical bar graph Initialize thin vertical bar graph Initialize horizontal bar graph Define custom character Draw vertical bar graph Draw horizontal bar graph Syntax FE 76 254 118 254 'v' FE 73 254 115 254 's' FE 68 254 104 254 'h' FE 4E [c][8 bytes] 254 78 [c][8 bytes] 254 'N' [c][8 bytes] FE 3D [col][length] 254 61 [col][length] 254 '=' [col][length] FE 7C [c][r][d][length] 254 124 [c][r][d][length] 254 '|' [c][r][d][length] Notes Initializes the user character set to make wide vertical bar graphs. Initializes the user character set to make narrow vertical bar graphs. Initializes the user character set to make horizontal bar graphs. Defines one of 8 custom "user" characters. Character number is [c] between 0x00 and 0x07. The 8 bytes are described in section 4.1.6. Draws a vertical bar graph at column [col] of length [length]. Length is measured in pixels (0x00 to 0x14). User must first use the 'v' or 's' command to initialize characters. Draws a horizontal bar graph starting at column [c] on row [r] with direction [d] (0 is right, 1 is left) of length [length]. Length is measured in pixels (0x00 to 0x64 if starting in column 1). User must first use the 'h' command to initialize characters.
LK202-24-USB rev 1
29
6.7 Miscellaneous Commands
Note: The letter "R" in the Default column indicates that this state can be saved to nonvolatile memory with the Remember command. See section 5.1.1.
Table 6-4 Miscellaneous Commands Command Remember Clear display Syntax FE 93 [0|1] 254 147 FE 58 254 88 254 'X' FE 50 [contrast] 254 80 [contrast] 254 'P' [contrast] FE 91 [contrast] 254 145 [contrast] FE 99 [brightness] 254 153 [brightness] FE 98 [brightness] 254 152 [brightness] FE 42 [minutes] 254 66 [minutes] 254 'B' [minutes] FE 46 254 70 254 'F' FE 40 [40 char] 254 64 [40 char] 254 '@' [40 char] FE 56 [gpo #] 254 86 [gpo #] 254 'V' [gpo #] FE 57 [gpo #] 254 87 [gpo #] 254 'W' [gpo #] FE 37 254 55 254 '7' FE 39 [speed] 254 57 [speed] 254 '9' [speed] FE 34 [byte1][byte2] 254 52 [byte1][byte2] 254 '4' [byte1][byte2] Default off n/a Notes Turns the "remember" function on [1] or off [0]. Clears screen of text and graphics, places text cursor at top left. Sets display contrast. Compensates for viewing angle. Contrast is a value between 0 and 255 (hex 0 to FF). Larger = darker. Same as "set contrast" but saves [contrast] as default. Sets display brightness. Brightness is a value between 0 and 255 (hex 0 to FF). Larger = brighter. Same as "set brightness " but saves [brightness] into memory. Backlight will stay on for [minutes]. If [minutes] = 0 backlight will stay on permanently. Turns off backlight.
Set contrast
0x80 128 0x80 128 0xFF 255 0xFF 255 on R on R Matrix Orbital LK202-24-USB off
Set contrast and save Set Brightness
Set Brightness and save Backlight on
Backlight off
Load startup screen
Loads new startup screen (40 characters). Screen is remembered for subsequent power ups. Turns a general purpose output OFF. [gpo #] may be from 1 to 6. See section 2.2 for further details. Turns a general purpose output ON. [gpo #] may be from 1 to 6. See section 2.2 for further details. Reads the module type. See table in section 5.1.12. Sets RS232 speed. See table in section 5.1.13 for values of [speed]
General purpose output off General purpose output on Read module type
off
see table
Set RS232 port speed
19,200 baud
Set Serial Number
This is a one-time-use command which works only on units without factory set serial numbers.
LK202-24-USB rev 1
30
Read Serial Number
FE 35 254 53 254 '5' FE 36 254 54 254 '6'
Reads the two byte serial number of the module. Reads the firmware version number of the module.
Read Version Number
LK202-24-USB rev 1
31
7. Appendix: Specifications and Options
7.1 Specifications
Standard Temperature Operating Temperature Storage Temperature 0C to +50C -20C to +70C
Operating Relative Humidity 90% max non-condensing
Electrical Specifications Supply Voltage Supply Current Supply Backlight Current 4.75 - 5.25 Vdc 35 mA typical 115 mA typical
Optical Characteristics Number of Characters Matrix format Display Area Character Size Character Pitch Line pitch Dot Size Dot Pitch LED Backlight Life Color of Illumination 40 (20 characters by 2 lines) 5 x 7 with underline 82.2 x 18.20 mm XxY 3.20 x 5.55 mm (XxY), not including underline 3.7 mm 5.95 mm 0.60 x 0.65 mm (XxY) 0.65 x 0.70 mm (XxY) 100,000 hours typical Yellow Green, Ice Blue, Inverse Blue, Inverse Red, Inverse Yellow
LK202-24-USB rev 1
32
Figure 7-1 Physical Layout
7.2 Options
Options Available on LK202-24-USB Inverse Blue with White Backlight Inverse Yellow Inver Red Gray Glass and White backlight (ice blue) -WB -IY -R -GW
LK202-24-USB rev 1
33
8. Appendix: Glossary
ASCII American Standard Code for Information Interchange. A 7 bit binary code representing the english alphabet, decimal numbers and common punctuation marks. "Also includes control characters" such as carriage return or end of text. An 8 bit superset of the standard ASCII codes is often used today to include foreign characters and other symbols. These supersets are often called extended ASCII character sets. A backlit display is illuminated from behind to provide nighttime and improved daytime readability. The (data and signaling) bit transmission rate of an RS232 device.
Backlight Baud Rate
Binary Number A number written using binary notation which only uses zeros and ones Bit Bitmap The smallest unit of information a computer can work with. Each bit is either 0 or 1. Binary digit. A representation, consisting of rows and columns of dots, of a graphics image in computer memory. The value of each dot (whether it is filled in or not) is stored in one or more bits of data. A grouping of eight binary bits Cold Cathode Fluorescent Lamp. A high brightness backlighting source consists of a fluorescent tube powered by a high voltage A.C. source. The way a system is set up, or the assortment of components that make up the system. Configuration can refer to either hardware or software, or the combination of both. The ratio of luminance between the light state of the display to the dark state of the display. The microcontroller or PC used to control the Matrix Orbital display unit. The designation of a connector used in the RS232 interface: 9 pin connector Software (programs or data) that has been written onto read-only memory (ROM). Firmware is a combination of software and hardware. ROMs, PROMs and EPROMs and flash EEPROMs that have data or programs recorded on them are firmware. A design for a set of characters. A font is the combination of typeface and other qualities, such as size, pitch, and spacing. A definition of where font is to be placed, such as margins and spacing between characters and lines. Refers to the base-16 number system, which consists of 16 unique symbols: the numbers 0 to 9 and the letters A to F. For example, the decimal number 15 is represented as F in the hexadecimal numbering system. The hexadecimal system is useful because it can represent every byte (8 bits) as two consecutive hexadecimal digits. It is easier for humans to read hexadecimal numbers than binary numbers. Short for Inter-IC, a type of bus designed by Philips Semiconductors in the early 1980s, which is used to connect integrated circuits (ICs). IC is a multimaster bus, which means that multiple chips can be connected to the same bus and each one can act as a master by initiating a data transfer. A means by which two systems interact.
Byte CCFL Configuration
Contrast Controller DB-9 Firmware
Font Font Metric Hexadecimal
IC
Interface
LK202-24-USB rev 1
34
LCD Module Type Value Pixel Pre-Generated Fonts Primitive
Liquid Crystal Display This refers to the model number of the module. The smallest individually controllable element of a display. Pre-determined fonts which can be downloaded into graphic liquid crystal displays. A low-level object or operation from which higher-level, more complex objects and operations can be constructed. In graphics, primitives are basic elements, such as lines, curves, and polygons, which you can combine to create more complex graphical images Short for recommended standard-232C, a standard interface approved by the Electronic Industries Association (EIA) for connecting serial devices. To view consecutive lines of data on the display screen. The term scroll means that once the screen is full, each new line appears at the bottom edge of the screen and all other lines move up one position. A number that is one of a series and is used for identification of the module A port, or interface, that can be used for serial communication, in which only 1 bit is transmitted at a time. This refers to the firmware revision number of the module. Temporary memory. Once the power supply is turned off volatile memory is then erased.
RS-232 Scroll
Serial Number Serial Port Version Number Volatile Memory
LK202-24-USB rev 1
35
LK202-24-USB rev 1
36


▲Up To Search▲   

 
Price & Availability of LK202-24-USB

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X